<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <link rel="stylesheet" href="${staticServer}/inc/style/main.css"/>
    <link rel="stylesheet" href="${staticServer}/inc/style/page.css"/>
    <link rel="stylesheet" href="${staticServer}/css/struct_info.css"/>
    <script src="${staticServer}/inc/js/jquery.js"></script>
    <script src="${staticServer}/inc/js/pageset.js"></script>
    <script src="${staticServer}/inc/js/submitter.js"></script>
    <script src="${staticServer}/inc/js/infopad.js?2.2"></script>
    <script type="text/javascript" src="${staticServer}/common/uploadify/jquery.uploadify.js"></script>
    <script type="text/javascript" src="${staticServer}/js/web/uploadImg.js?1.5"></script>
	<script type="text/javascript" src="${staticServer}/js/web/addGoods.js"></script>
    <link rel="stylesheet" href="${staticServer}/inc/style/date/datepicker.css"/>
    <script src="${staticServer}/inc/js/datepicker.js"></script>

    <style>
        #SWFUpload_0 {
            margin-top: 70px;
            margin-left: -30px;
        }
    </style>
    <script type="text/javascript">
    $(function(){
    	var contextPath='${contextPath}';
    });
    </script>
</head>
<input type="hidden" id="goodid">
<input type="hidden" id="size">
<input type="hidden" id="goods_child_id" value="<#if goods_child_id??>${goods_child_id}</#if>">
<body>
<div id="home_link">
    <ul>
        <li></li>
        <li>&gt;</li>
        <li>采购申请</li>
        <li>&gt;</li>
        <li class="current">物品申请</li>
    </ul>
</div>
<div id="container">
    <div id="title">物品申请</div>
    <table id="tbl_State">
		<tbody align="right">
			<tr>
				<td width="5%">物品名称</td>
				<td width="5%">物品种类</td>
				<td width="5%">型号</td>
				<td width="5%">数量</td>
				<td width="5%">创建时间</td>
				<td width="5%">最新编辑人</td>
				<td width="5%">操作</td>
			</tr>
			<#if goodsNewList??>
		              <#list goodsNewList as list>
						<tr align="right">
							<td width="8%" >${list.item_name}</td>
		                   <td width="10%" >
		                   ${list.good_parint_name} - ${list.goods_name}
		                    </td>
							<td  width="8%">
								${list.model}
							</td>
		                   	<td  width="5%" >
		                    	${list.number}
		                    </td>
		                    <td  width="15%" >
		                    	${list.create_time}
		                    </td>
		                    <td  width="10%">
		                     	${list.sq_user}
		                    </td>
		                    <td width="10%" align="right">
		                    	<button class="btn_highlight" onclick="toEdit('${list.id}')">编辑</button>
		                    </td>
						</tr>	
		               </#list>
	             </#if>
		</tbody>
	</table>
    <table id="infotable">
        <tr>
            <th>类型:</th>
            <td>
                <select id="type" disabled="disabled">
                    <option value="1">固定资产</option>
                    <option value="2">消耗品</option>
                </select>
            </td>
        </tr>

        <tr>
            <th>办公地址:</th>
            <td>
                <select id="center_id" disabled="disabled">
                <#if offList??>
                    <#list offList as list>
                        <option value="${list.keyname}">${list.name}</option>
                    </#list>
                </#if>
                </select>
            </td>
            <td colspan="2">
				<a onclick="confirmGoods()">+</a>
				<font color="red">(单条保存点击这里)</font>
			</td>
        </tr>

        <tr>
            <th>物品分类:</th>
            <td >
                <select id="good_mnus" disabled="disabled">
                <#if list??>
                    <#list list as list>
                        <option value="${list.id}">${list.name}</option>
                    </#list>
                </#if>
                </select>
                 <select id="pratin" disabled="disabled">
                        <option value="">请选择</option>
                </select>
            </td>
        </tr>
        <tr>
            <th>物品名称:</th>
            <td><input id="itemName" value="" type="text" size="50" maxlength="30" disabled="disabled"/></td>
        </tr>
        <tr id="dnxh" style="display:none">
            <th >型号:</th>
            <td><input id="model" type="text" size="50" maxlength="30" disabled="disabled"/></td>
        </tr>
        <tr  id="bh" style="display:none">
            <th>编号/编码:</th>
            <td><input id="code" type="text" size="50" maxlength="30" disabled="disabled"/></td>
        </tr>
        <tr id="kdxh" style="display:none">
            <th >类型:</th>
            <td><input id="broadband_type" type="text" size="50" maxlength="30" placeholder="例：联通-20M-光纤/联通卡、移动卡" disabled="disabled"/></td>
        </tr>
        <tr  id="fey" style="display:none">
            <th>费用:</th>
            <td><input id="supplier" type="text" size="50" maxlength="30" /></td>
        </tr>
        <tr id="numb">
            <th>物品数量:</th>
            <td><input id="number" value="1" onchange="totalCalculation()"
                       onkeyup="this.value=this.value.replace(/[^0-9]/g,'')"
                       onafterpaste="this.value=this.value.replace(/[^0-9]/g,'')" type="text" size="50" maxlength="30"/>
            </td>
        </tr>

        <tr id="nummone">
            <th>物品单价:</th>
            <td><input id="unitPrice" type="text" onchange="totalCalculation()" onkeyup="clearNoNum(this)" size="50"
                       maxlength="30"/></td>
        </tr>
        <tr id="contz">
            <th>物品单个总额:</th>
            <td><input id="totalCalculation" disabled='disabled' type="text" size="50" maxlength="30"/></td>
        </tr>
        <tr id="contz">
            <th>物品所有总额:</th>
            <td><input id="goods_price_total" disabled='disabled' type="text" size="50" maxlength="30"/></td>
        </tr>
        <tr>
            <th>物品申请人:</th>
            <td><input id="squser" type="text"  value="<#if goods??>${goods.sq_user}</#if>" size="50" maxlength="30" disabled="disabled"/></td>
        </tr>
        <tr>
            <th>采购单号:</th>
            <td><input id="purchasing_num" type="text" value="<#if goods??>${goods.purchasing_num}</#if>" size="50" maxlength="30"/></td>
        </tr>
        <tr>
            <th >采购链接:</th>
            <td><input id="purchasing_link" type="text" size="50" maxlength="50"/></td>
        </tr>
        
        <tr>
				<th>物品相关图片:</th>
				<td>
					<ul class="imglist">
					<div id="images" style="float: left;">
						<#if img_url?? && img_url!="">
							<#list img_url?split(",") as imgurl>
								<#if imgurl_index !=0>
								<img rel="800:485" width="180" height="109.125" src="http://120.55.241.58/${imgurl}">
								</#if>
							</#list>
						</#if>
					</div>
						
					</ul>
				</td>
			</tr>
        <tr>
            <th>备注:</th>
            <td>
                <textarea id="msg" style="width:400px;height: 150px;" placeholder="如采购物品为特殊物品请在备注表明"></textarea>
            </td>
        </tr>
		<tr>
            <th>审核状态:</th>
            <td>
                 <select id="apply_status" disabled="disabled">
                        <option value="">请选择</option>
                        <option value="1">未审核</option>
                        <option value="2">审核通过</option>
                </select>
            </td>
        </tr>
    </table>
    <div id="controlbar">
        <input type="button" class="submit" onclick="addGood()" value="  保  存  "/>
        <input type="button" class="btn_normal" onclick="javascript:history.back(-1);" value="  返回列表 "/>
    </div>
</div>

</body>
</html>